<?php
	require_once('../webroot/js/clsMsDocGenerator.php');	
		
	$doc = new clsMsDocGenerator();
	
	$doc->setFontFamily('Arial');
	$doc->setFontSize('11');

	$doc->addParagraph('REPORTE ESTUDIANTIL', array('text-align' => 'center','font-weight' => 'bold'));
	$doc->addParagraph('CORPORACI&Oacute;N INFANCIA Y DESARROLLO',array('font-weight' => 'bold'));
	$doc->addParagraph('FECHA: '.$fecha,array('font-weight' => 'bold'));
	$doc->addParagraph('TUTOR: '.$tutor_activo,array('font-weight' => 'bold'));
	$doc->addParagraph('CIRCULO APRENDIZAJE: '.$circulo_activo,array('font-weight' => 'bold'));
	foreach ($estudiantes as $estudiante){
	$doc->addParagraph('ESTUDIANTE: '.$estudiante['Estudiante']['nombre_completo'],array('font-weight' => 'bold'));	
	}
	$doc->addParagraph('');
	$doc->addParagraph('I.	DATOS BASICOS',array('font-weight' => 'bold'));
	$doc->addParagraph('');
	
	foreach ($estudiantes as $estudiante){
		
		$doc->addParagraph('Documento',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['tipo_documento'].":  ".$estudiante['Estudiante']['documento'], array('margin-left'=>'25pt'));
		
		$doc->addParagraph('Lugar expedici&oacute;n',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($municipio_expedicion.",   ".$departamento_expedicion['Departamento']['nombre'], array('margin-left'=>'25pt'));
		
		$doc->addParagraph('Fecha nacimiento',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['fecha_nacimiento'], array('margin-left'=>'25pt'));
		
		$doc->addParagraph('Lugar nacimiento',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($municipio_nacimiento.",  ".$departamento_nacimiento['Departamento']['nombre'], array('margin-left'=>'25pt'));
		
		$doc->addParagraph('Genero',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['genero'], array('margin-left'=>'25pt'));
		
		$doc->addParagraph('Tipo sangre',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['tipo_sangre'], array('margin-left'=>'25pt'));
		
		$doc->addParagraph('Lugar que ocupa en la familia',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['lugar_familia'], array('margin-left'=>'25pt'));
		
		$doc->addParagraph('Ha estado institucionalizado',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['intitucionalizado'], array('margin-left'=>'25pt'));
		
		if ($estudiante['Estudiante']['intitucionalizado']=="Si"){
		$doc->addParagraph('Nombre de la instituci&oacute;n',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['institucion'], array('margin-left'=>'25pt'));
		
		$doc->addParagraph('Tiempo de duraci&oacute;n (meses)',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['duracion'], array('margin-left'=>'25pt'));
		}
		$doc->addParagraph('Beneficiario de otro programa',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['beneficiario_programa'], array('margin-left'=>'25pt'));
		
		if ($estudiante['Estudiante']['beneficiario_programa']=="Si"){
		$doc->addParagraph('Nombre programa',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['nombre_programa'], array('margin-left'=>'25pt'));
		}		
		$doc->addParagraph('');
	    $doc->addParagraph('II. FORMACION ACADEMICA',array('font-weight' => 'bold'));
	    $doc->addParagraph('');
	    
	    if ($estudiante['Estudiante']['condicion_finalizar']!="No aplica"){
	    $doc->addParagraph('Condici&oacute;n acad&eacute;mica al finalizar',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['condicion_finalizar'], array('margin-left'=>'25pt'));	
	    }
		$doc->addParagraph('Situaci&oacute;n acad&eacute;mica al finalizar',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['situacion_academica'], array('margin-left'=>'25pt'));
		
		$doc->addParagraph('Estado acad&eacute;mico anterior',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['estado_academico_anterior'], array('margin-left'=>'25pt'));		
		
		if ($estudiante['Estudiante']['causa_retiro_academico']!="Otro"){
		$doc->addParagraph('Causa retiro acad&eacute;mico',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['causa_retiro_academico'], array('margin-left'=>'25pt'));
		}
		if ($estudiante['Estudiante']['causa_retiro_academico']=="Otro"){
		$doc->addParagraph('Otra causa  de retiro acad&eacute;mico. Cual?',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['causa_otro_retiro_academico'], array('margin-left'=>'25pt'));					
		}
		
		$doc->addParagraph('Fecha retiro acad&eacute;mico',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['fecha_retiro_academico'], array('margin-left'=>'25pt'));
		
		if ($estudiante['Estudiante']['discapacidad']!="No Aplica"){
		$doc->addParagraph('Discapacidad',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['discapacidad'], array('margin-left'=>'25pt'));
		}		
		if ($estudiante['Estudiante']['capacidad_excepcional']!="No aplica"){
		$doc->addParagraph('Capacidad excepcional',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['capacidad_excepcional'], array('margin-left'=>'25pt'));
		}		
		$doc->addParagraph('Registrado en Simat',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['simat'], array('margin-left'=>'25pt'));
		
		$doc->addParagraph('Sabe leer',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['leer'], array('margin-left'=>'25pt'));
		
		$doc->addParagraph('Proviene de otro municipio',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['proviene_municipio'], array('margin-left'=>'25pt'));
	    
		$doc->addParagraph('');
	    $doc->addParagraph('III. INFORMACION SOCIOECONOMICA',array('font-weight' => 'bold'));
	    $doc->addParagraph('');
	    
	    $doc->addParagraph('Zona de residencia',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['zona_residencia'], array('margin-left'=>'25pt'));	
		
		$doc->addParagraph('Direcci&oacute;n residencia',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['direccion'], array('margin-left'=>'25pt'));
		
		$doc->addParagraph('Comuna/Corregimiento',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['comuna_corregimiento'], array('margin-left'=>'25pt'));		
		
		$doc->addParagraph('Barrio/Vereda',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['barrio_vereda'], array('margin-left'=>'25pt'));
		
		$doc->addParagraph('Tenencia de la vivienda',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['vivienda'], array('margin-left'=>'25pt'));					
		
		$doc->addParagraph('Carencia de servicios p&uacute;blicos',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['carencia_sp'], array('margin-left'=>'25pt'));
		
		$doc->addParagraph('Tiempo de desplazamiento de la casa al CA',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['tiempo_desplazamiento'], array('margin-left'=>'25pt'));
		
		$doc->addParagraph('Medio desplazamiento',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['medio_desplazamiento'], array('margin-left'=>'25pt'));
		
		$doc->addParagraph('Debe cubrir el transporte',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['cubre_transporte'], array('margin-left'=>'25pt'));
		
		$doc->addParagraph('Cu&aacute;ntas veces se ha trasladado de vivienda',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['traslado_vivienda'], array('margin-left'=>'25pt'));
		
		$doc->addParagraph('Hace cuanto vive en el municipio',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['tiempo_vivienda'], array('margin-left'=>'25pt'));
		
		$doc->addParagraph('N&uacute;mero de integrantes del n&uacute;cleo familiar',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['numero_familia'], array('margin-left'=>'25pt'));	
		
		$doc->addParagraph('Promedio de ingresos familiares',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['ingresos_familiares'], array('margin-left'=>'25pt'));
		
		$doc->addParagraph('Trabaja',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['trabaja'], array('margin-left'=>'25pt'));		
		
		$doc->addParagraph('Comidas al d&iacute;a',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['comidas'], array('margin-left'=>'25pt'));
		
		$doc->addParagraph('Estrato',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['estrato'], array('margin-left'=>'25pt'));					
		
		$doc->addParagraph('Sisben',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['sisben'], array('margin-left'=>'25pt'));
		
		$doc->addParagraph('Ars',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['ars'], array('margin-left'=>'25pt'));
		
		$doc->addParagraph('Eps',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['eps'], array('margin-left'=>'25pt'));
		
		$doc->addParagraph('Padece enfermedad cr&oacute;nica',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['enfermedad_cronica'], array('margin-left'=>'25pt'));
		
		$doc->addParagraph('Recibe tratamiento m&eacute;dico',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['tratamiento_medico'], array('margin-left'=>'25pt'));
		
		$doc->addParagraph('Tel&eacute;fono',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['telefono'], array('margin-left'=>'25pt'));
	
	
		$doc->addParagraph('');
	    $doc->addParagraph('IV. OTRA INFORMACION',array('font-weight' => 'bold'));
	    $doc->addParagraph('');
	    
	    if ($estudiante['Estudiante']['victima_conflicto']!= "No aplica"){
	    $doc->addParagraph('Victima conflicto',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['victima_conflicto'], array('margin-left'=>'25pt'));
		
		$doc->addParagraph('Lugar expulsor (Municipio/Departamento)',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($municipio_expulsor.",   ".$departamento_expulsor['Departamento']['nombre'], array('margin-left'=>'25pt'));
			
		$doc->addParagraph('Tiempo desplazado',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['tiempo_desplazado'], array('margin-left'=>'25pt'));
		
		$doc->addParagraph('Registro desplazado',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['registro_desplazado'], array('margin-left'=>'25pt'));		
		
		$doc->addParagraph('Nombre del declarante ante la RED',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['nombre_red'], array('margin-left'=>'25pt'));
		
		$doc->addParagraph('CC del declarante ante la RED',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['documento_red'], array('margin-left'=>'25pt'));					
		}
		
		$doc->addParagraph('Cabeza familia',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['cabeza_familia'], array('margin-left'=>'25pt'));
		
		$doc->addParagraph('Dependiente',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['dependiente'], array('margin-left'=>'25pt'));
		
		if ($estudiante['Estudiante']['grupo_etnico']!="No Aplica"){
		$doc->addParagraph('Grupo etnico',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['grupo_etnico'], array('margin-left'=>'25pt'));
		}
		$doc->addParagraph('Soportes',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['soportes'], array('margin-left'=>'25pt'));
		
		$doc->addParagraph('Auto251',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['auto251'], array('margin-left'=>'25pt'));
		
		$doc->addParagraph('Focalizacion',array('font-weight' => 'bold', 'text-align'=>'justify','font-size' => '12pt','margin-left'=>'15pt'));
		$doc->addParagraph($estudiante['Estudiante']['focalizacion'], array('margin-left'=>'25pt'));
	
	 
	    $doc->addParagraph('');
	    $doc->addParagraph('V. INFORMACION FAMILIAR',array('font-weight' => 'bold'));
	    $doc->addParagraph('');
	 }
	 //Tabla
	    $doc->startTable(NULL, 'tableWithoutGrid');
		$header = array('Nombre familiar', 'Nivel escolaridad', 'Ocupaci&oacute;n', 'Telefono', 'Parentesco', 'Direcci&oacute;n', 'Acudiente', 'Aporta');
		$aligns = array('center', 'center', 'center', 'center', 'center', 'center', 'center', 'center');
		$valigns = array('middle', 'middle', 'middle', 'middle', 'middle', 'middle', 'middle', 'middle');
		$doc->addTableRow($header, $aligns, $valigns, array('font-weight' => 'normal', 'font-size' => '11pt', 
														'background-color' => '#9F9F9F', 'color'=>'white'));
     foreach ($familiares as $familiar){	    
	    
     	
     	$cols = array();	
				$cols[]=$familiar['Familiare']['nombre_completo'];	
				$cols[]=$familiar['Familiare']['nivel_escolaridad'];
				$cols[]=$familiar['Familiare']['ocupacion'];	
				$cols[]=$familiar['Familiare']['telefono'];
				$cols[]=$familiar['Familiare']['parentesco'];	
				$cols[]=$familiar['Familiare']['direccion'];
				$cols[]=$familiar['Familiare']['acudiente'];	
				$cols[]=$familiar['Familiare']['aporta'];
				$doc->addTableRow($cols, NULL, NULL, array('font-size' => '10pt'));	
		}
	    $doc->endTable();
	   
        $doc->addParagraph('');
	    $doc->addParagraph('ASISTENCIA',array('font-weight' => 'bold'));
	    $doc->addParagraph('');

	    //Tabla
	    $doc->startTable(NULL, 'tableWithoutGrid');
		$header = array('Mes', 'Fallas');
		$aligns = array('center', 'center');
		$valigns = array('middle', 'middle');
		$doc->addTableRow($header, $aligns, $valigns, array('font-weight' => 'normal', 'font-size' => '11pt', 
														'background-color' => '#9F9F9F', 'color'=>'white'));
	    foreach ($asistencias as $asistencia){  	
	    	
			$cols = array();	
				$cols[]=$asistencia['Asistencia']['mes'];	
				$cols[]=$asistencia['Asistencia']['fallas'];
				$doc->addTableRow($cols, NULL, NULL, array('font-size' => '10pt'));	
		}
	    $doc->endTable();	
	    
	    $doc->addParagraph('');
	    $doc->addParagraph('PRUEBAS DE ADSCRIPCION',array('font-weight' => 'bold'));
	    $doc->addParagraph(''); 

	    //Tabla
	    $doc->startTable(NULL, 'tableWithoutGrid');
		$header = array('Area', 'Criterio', 'Puntaje');
		$aligns = array('center', 'center', 'center');
		$valigns = array('middle', 'middle', 'middle');
		$doc->addTableRow($header, $aligns, $valigns, array('font-weight' => 'normal', 'font-size' => '11pt', 
														'background-color' => '#9F9F9F', 'color'=>'white'));
	    foreach ($resultados as $resultado){ 	    	
	    
	    	    $cols = array();	    	
	    	    $cols[]=$resultado['Criterio']['area'];	
				$cols[]=$resultado['Criterio']['indicador'];	
				$cols[]=$resultado['Criterio']['nivel'];				
				$doc->addTableRow($cols, NULL, NULL, array('font-size' => '10pt'));	
		}
	    $doc->endTable();	    
	    
	    $doc->addParagraph('');
	    $doc->addParagraph('PRUEBAS FINALES',array('font-weight' => 'bold'));
	    $doc->addParagraph(''); 

	    //Tabla
	    $doc->startTable(NULL, 'tableWithoutGrid');
		$header = array('Area', 'Criterio', 'Puntaje');
		$aligns = array('center', 'center', 'center');
		$valigns = array('middle', 'middle', 'middle');
		$doc->addTableRow($header, $aligns, $valigns, array('font-weight' => 'normal', 'font-size' => '11pt', 
														'background-color' => '#9F9F9F', 'color'=>'white'));
	    foreach ($resultados_finales as $resultado_final){ 	    	
	    
	    	    $cols = array();	    	
	    	    $cols[]=$resultado_final['Criterio']['area'];	
				$cols[]=$resultado_final['Criterio']['indicador'];	
				$cols[]=$resultado_final['Criterio']['nivel'];				
				$doc->addTableRow($cols, NULL, NULL, array('font-size' => '10pt'));	
		}
	    $doc->endTable();
	    
	    $doc->addParagraph('');
	    $doc->addParagraph('CONTROL GUIAS',array('font-weight' => 'bold'));
	    $doc->addParagraph(''); 
	    
	    //Tabla
	    $doc->startTable(NULL, 'tableWithoutGrid');
		$header = array('Cartilla', 'Unidad', 'Guia','Fecha inicio','Fecha fin');
		$aligns = array('center', 'center', 'center', 'center', 'center');
		$valigns = array('middle', 'middle', 'middle', 'middle', 'middle');
		$doc->addTableRow($header, $aligns, $valigns, array('font-weight' => 'normal', 'font-size' => '11pt', 
														'background-color' => '#9F9F9F', 'color'=>'white'));
	    foreach ($guiasEstudiantes as $guia){ 	    	
	      
	    	    $cols = array();
	    	    $cols[]=$guia['nombre_cartilla'];
	    	    $cols[]=$guia['nombre_unidad'];		    	
	    	    $cols[]=$guia['Guia']['nombre'];
	    	    $cols[]=$guia['GuiasEstudiante']['fecha_inicio'];
	    	    $cols[]=$guia['GuiasEstudiante']['fecha_fin'];												
				$doc->addTableRow($cols, NULL, NULL, array('font-size' => '10pt'));	
		}
	    $doc->endTable();
	    
	    $doc->addParagraph('');
	    $doc->addParagraph('SEGUIMIENTOS',array('font-weight' => 'bold'));
	    $doc->addParagraph('');

	    //Tabla
	    $doc->startTable(NULL, 'tableWithoutGrid');
		$header = array('Tipo seguimiento', 'Estrategia', 'Persona contactada', 'Parentesco', 'Descripci&oacute;n actitudes', 'Incumplimiento pactos','Pactos','Estado','Creado por');
		$aligns = array('center', 'center', 'center', 'center', 'center', 'center', 'center', 'center', 'center');
		$valigns = array('middle', 'middle', 'middle', 'middle', 'middle', 'middle', 'middle', 'middle', 'middle');
		$doc->addTableRow($header, $aligns, $valigns, array('font-weight' => 'normal', 'font-size' => '11pt', 
														'background-color' => '#9F9F9F', 'color'=>'white'));
	    foreach ($seguimientos as $seguimiento){  	
	    	
			    $cols = array();	
				$cols[]=$seguimiento['Seguimiento']['tipo_seguimiento'];	
				$cols[]=$seguimiento['Seguimiento']['estrategia'];
				$cols[]=$seguimiento['Seguimiento']['persona_contactada'];
				$cols[]=$seguimiento['Seguimiento']['parentesco'];
				$cols[]=$seguimiento['Seguimiento']['descripcion_actitudes'];
				$cols[]=$seguimiento['Seguimiento']['incumplimiento_pactos'];
				$cols[]="*Padres: ".$seguimiento['Seguimiento']['pactos_padres'].
			            " *Estudiante: " .$seguimiento['Seguimiento']['pactos_estudiante'];
				$cols[]=$seguimiento['Seguimiento']['estado'];
				$cols[]=$seguimiento['nombre_user'];
				$doc->addTableRow($cols, NULL, NULL, array('font-size' => '10pt'));	
		}
	    $doc->endTable();
	    
	    $doc->addParagraph('');
	    $doc->addParagraph('APOYOS FAMILIARES',array('font-weight' => 'bold'));
	    $doc->addParagraph('');
	    
	    //Tabla
	    $doc->startTable(NULL, 'tableWithoutGrid');
		$header = array('Asesor Psicosocial', 'Persona Visitada','Parentesco', 'Educaci&oacute;n','Soluci&oacute;n inconvenientes','Acompa&ntilde;amiento tareas', 'Habitaci&oacute;n','Orden y aseo');
		$aligns = array('center', 'center', 'center', 'center','center', 'center', 'center', 'center');
		$valigns = array('middle', 'middle', 'middle', 'middle','middle', 'middle', 'middle', 'middle');
		$doc->addTableRow($header, $aligns, $valigns, array('font-weight' => 'normal', 'font-size' => '11pt', 
														'background-color' => '#9F9F9F', 'color'=>'white'));
	    foreach ($apoyos as $apoyo){  	
	    	
			    $cols = array();	
			    $cols[]=$apoyo['nombre_user'];
				$cols[]=$apoyo['Apoyo']['persona_visita'];	
				$cols[]=$apoyo['Apoyo']['parentesco'];
				$cols[]=$apoyo['Apoyo']['educacion'];
				$cols[]=$apoyo['Apoyo']['solucion_inconvenientes'];
				$cols[]=$apoyo['Apoyo']['acompanamiento_tareas'];
				$cols[]=$apoyo['Apoyo']['habitaciones'];
				$cols[]=$apoyo['Apoyo']['orden_aseo'];						
				$doc->addTableRow($cols, NULL, NULL, array('font-size' => '10pt'));	
		}
	    $doc->endTable();		
	    
	$doc->addParagraph('');
	$doc->output('Reporte Estudiantil('.$estudiante['Estudiante']['nombre_completo'].')');
?>